package Thread.Test.Test2;

import java.util.concurrent.FutureTask;

public class ThreadTest {
    public static void main(String[] args) {
        //有100份礼品,两个人同时发送,当小于10份是不再送出
        MyCallable my =new MyCallable();
        FutureTask<String> ft =new FutureTask<>(my);
        Thread t1 =new Thread(ft,"陈秀丽");
        Thread t2 =new Thread(ft,"李变态");

        t1.start();
        t2.start();
    }
}
